struct PS_INPUT
{
  float2 Tex0: TEXCOORD0;
};

sampler base_map = sampler_state
{
  MipFilter = LINEAR;
  MinFilter = LINEAR;
  MagFilter = LINEAR;
};

float V_InvScreenH : INVSCREENH;

float4 PS(PS_INPUT In) : COLOR0
{
  float4 color = tex2D(base_map, In.Tex0);
  color  = tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 1)); //0.42;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 1)); //0.42;
  color += tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 2)); //0.35;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 2)); //0.35;
  color += tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 3)); //0.23;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 3)); //0.23;
  color += tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 4)); //0.19;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 4)); //0.19;
  color += tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 5)); //0.14;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 5)); //0.14;
  color += tex2D(base_map, In.Tex0 + float2(0,V_InvScreenH * 6)); //0.10;
  color += tex2D(base_map, In.Tex0 - float2(0,V_InvScreenH * 6)); //0.10;
  color = color * 1/13;
  color.a = 1.0;

  return color;
}

technique Blur
{
  pass Blur
  {
    PixelShader = compile ps_2_0 PS();
  }
}
